package com.webside.subject.mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.webside.base.basemapper.BaseMapper;
import com.webside.subject.model.SubjectEntity;
import com.webside.util.PageUtil;

public interface SubjectMapper extends BaseMapper<SubjectEntity, Long> {
	/**
	 * 查询所有
	 * @return
	 */
	List<SubjectEntity> selectAllSubject();
	List<String> selectAllSubjectName();
	List<Map<String,Object>> selectSubjectName();
	List<SubjectEntity> selectSubject(SubjectEntity subject);
	List<SubjectEntity> querySubject(Map<String,Object> param);
	//查询subject
	SubjectEntity findBySubject(SubjectEntity subject);
	@Override
	List<SubjectEntity> queryListByPage(Map<String, Object> parameter);
	/**
	 * 新增
	 */
	void addSubject(SubjectEntity subject);
	@Override
	int insert(SubjectEntity subject);
	/**
	 * 
	 * 删除
	 */
	int deleteSubject(List<String> SubjectId);
	/**
	 * 修改
	 *
	 */
	void updateSubject(SubjectEntity subject);
	@Override
	int update(SubjectEntity subject);
	 
	//分页及关键字查询
  	public List<HashMap<String,Object>> querySeries(@Param("page")PageUtil page, @Param("sort")String sort,@Param("code")String code);
  	//根据Map查询
	List<SubjectEntity> selectSubjectByMap(Map<String, Object> parameters);
	//根据Map修改
	void updateSubjectByMap(Map<String, Object> parameters);
}
